<?php
/**
 * 日期间隔
 */
$this->title = 'My Yii Application';
$css = <<<CSS
.sl{width:50px;display: inline-block;padding:6px 5px}
.sm{display: inline-block;width:10rem}
#result{margin-top: 10px}
CSS;

$this->registerCss($css);

$js = <<<JS
    $('#daydiff').click(function(){
        var ca=$('form').serialize();
        $.post('',ca,function(re){
            if (re.status==0){
                $('#result').html(
                    '<table class="table table-bordered">'
                    +'<tr><th>省份</th><td>'+re.data.provice+'</td></tr>'
                    +'<tr><th>城市</th><td>'+re.data.city+'</td></tr>'
                    +'<tr><th>运营商</th><td>'+re.data.operator+'</td></tr>'
                    +'<tr><th>区号</th><td>'+re.data.zone+'</td></tr>'
                    +'<tr><th>邮编</th><td>'+re.data.code+'</td></tr>'
                    +'</table>'
                    
                    )
            }else{
                $('#result').html(re.msg);
            }
        },'json');
        
    })
JS;
$this->registerJs($js);

?>

<div class="site-index">
    <div class="body-content">
        <h3>手机号归属查询</div>
    <hr/>
    <form class="form-inline">
        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class=" col-xs-12 text-center ">
                <span>手机号码</span>
                <input id="sm" name="c3" type="text" class="form-control sm" placeholder=""/>
            </div>
        </div>
        <div class="col-xs-12 col-lg-12 col-md-12 text-center" style="margin-top: 4px">
            <a id="daydiff" class="btn btn-primary col-lg-4 col-xs-6" style="float: initial !important;">
                <i class="icon-chevron-down icon-white"></i>归属查询</a>
        </div>
        <div class="col-xs-12 col-lg-12 col-md-12 text-center moreheight" id="result"
             style="height: 4rem;text-height:4rem"></div>
    </form>


</div>



